<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="UTF-8">
  <title>变量扩展</title>
</head>
<body>


  <script !src="">

    for (var i = 0; i < 100; i++) {
      let num= i;
    }

    alert(num);

  </script>
</body>
</html>